<div class="zs-body" data-ng-init="
		formInit('items', {
			keyField:'userid',
			orderObject:{userid:0} 
		}) &&	
		treeFormInit('useredit', {
		ssn:'useredit',
		esn:'useredit',
		keyField:'applyID',
		queryObject:{},
		randomFields:['applyID'],
		pageSize:10,
		maxNavs:3,
		}) && loadData('useredit');">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a>
            <i class="right-arr"></i>
            <a href="javascript:;">运维管理</a>
            <i class="right-arr"></i>
            <a href="javascript:;">用户修改申请</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新增 " 
				ng-click="addRow('useredit') && openWindow('edit');"/>
			<input type="button" class="zs-btn orange" value="编辑" 
				ng-click="editRow('useredit', useredit.sRows[0]) && openWindow('edit')"/>
			<input type="button" class="zs-btn orange" value="删除 " 
				ng-click="delEntitys('useredit')"/>
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="申请人名称" class="zs-input" ng-model="useredit.queryObject['applyUserName:like']"/>
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('useredit')"></a>
                <a class="ope-2"></a>
            </div>
            <div class="switch">
            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                    	<table>
	                        <thead>
			                    <tr>
			                   		<th>
			                        	<input id="allCheckbox" type="checkbox"
			                        		ng-click="selectAll('useredit','allCheckbox');">
			                        </th>
			                        <th>申请标题</th>
			                        <th>申请人名称</th>
			                        <th>申请时间</th>
			                        <th>申请人所在机构</th>
			                        <th>申请说明</th>
			                        <th>申请状态</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <tr ng-repeat="r in useredit.datas">
					                <td><input type="checkbox"
						                    ng-click="selectRow('useredit',r);"
						                    ng-model="r.selected" />
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.applyName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.applyUserName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.applyDate | asDate | date:'yyyy-MM-dd'"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.organizationName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.applyInfo"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('useredit',r) && openWindow('edit');">
					                        <label ng-bind="r.stateName"></label>
					                    </a>
					                </td>
					            </tr>
			                </tbody>
                        </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='useredit'></ag-Page>
                </div>
            </div>
        </div>
		<div ag-Window id="edit" title="用户申请" width='900px' height='600px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table>
				        <tbody>
				        	<tr>
		                        <td class="text" width="20%">申请标题</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="useredit.editRow.applyName"></td>
		                    </tr>
				        	<tr>
	                            <td class="text" width="20%">申请人ID</td>
	                            <td class="left" width="30%">
	                            	<input type="text" alias="申请人ID" class="zs-input" name="formApplyUserId" 
	                            		ng-model="useredit.editRow.applyUserId"  required /></td>
	                            <td class="text" width="20%">申请人名称</td>
	                            <td class="left" width="30%"><input type="text" alias="申请人名称" name="formApplyUserName"
	                                ng-model="useredit.editRow.applyUserName" class="zs-input" required/></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">申请时间</td>
	                            <td class="left" width="30%">
									<ag-Datebox id='publishDate' editable='false' showcurday='true'
		                        		class="zs-input" style="width:250px;height: 28px"
		                        		ng-model="useredit.editRow.applyDate" >
									</ag-Datebox>
	                            </td>
	                            <td class="text" width="20%">申请所在机构</td>
		                        <td class="left" width="30%">
				                   <ag-Combotree class="zs-input" style="width:250px;height: 28px" 	
										para="{ uDictionary:true,
												dictionary:'p_organization',
												pidField:'pid',
	                    						leafField:'leaf'}"
										ng-model="useredit.editRow.organizationId"
										text-Value="useredit.editRow.organizationName"/>
				                </td>
	                        </tr>
	                        <tr>
	                        	<td class="text" width="20%">申请说明</td>
	                           <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="useredit.editRow.applyInfo"></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">申请附件</td>
	                            <td class="left" width="30%">
	                            	<ag-Upload  ng-model="useredit.editRow.applyFile" 
										para="{filters:[{title:'附件', extensions:'*'}]}">
									</ag-Upload>
	                            </td>
	                            <td class="text" width="20%">添加用户</td>
	                            <td class="left" width="30%">
	                        		<input type="button" value="添加" class="zs-btn c-red" 
	                        			ng-click="addLocalRow(useredit.editRow,'items','items')"/>
	                        		<input type="button" value="删除" class="zs-btn c-red" 
	                        			ng-click="delLocalRows(useredit.editRow.items)"/>
	                            </td>
	                        </tr>
				        </tbody>
				    </table> 
					<table style="width: 100%;">
						<thead>
							<tr>
								<th width="5%" style="text-align: center;">
		                        	<input id="usereditCheckbox" type="checkbox"
		                        		ng-click="selectAllByList(useredit.editRow.items,'usereditCheckbox');">
		                        </th>
		                        <th width="13.5%" style="text-align: center;">账号</th>
		                        <th width="13.5%" style="text-align: center;">用户名</th>
		                        <th width="13.5%" style="text-align: center;">机构</th>
								<th width="13.5%" style="text-align: center;">部门</th>
								<th width="13.5%" style="text-align: center;">电话号码</th>
								<th width="13.5%" style="text-align: center;">系统权限</th>	
								<th width="13.5%" style="text-align: center;">修改类型</th>
							</tr>
						</thead>
						<tbody>
				        	<tr ng-repeat="x in useredit.editRow.items">
				        		<td><input type="checkbox" ng-click="selectRowByList(useredit.editRow.items,x);" ng-model="x.selected" /></td>				        		
				                
								<td>
				                	<input type="text" alias="账号" name="formUserid" 
				                		ng-model="x.userid" class="zs-input" required/></td>	
				                <td>
				                	<input type="text" alias="用户名" name="formUserName" 
				                		ng-model="x.userName" class="zs-input" required/></td>
				                <td>
				                	<ag-Combotree class="zs-input" style="width:115px;height: 28px" 
										fn='orgidEdit'
										para="{ uDictionary:true,
												dictionary:'p_organization',
												pidField:'pid',
	                    						leafField:'leaf'}"
										ng-model="x.organizationId"
										text-Value="x.organizationName"/></td>
				                <td>
				                	<ag-Combobox class="zs-input" style="width:115px;height:28px;"
		                        		fn='depEdit' para="{sn:'department',
		                        				pfn:'orgidEdit',
                    							foreignField:'organizationId',
												defaultQueryObject:{valid:true},
												orderObject:{order:0}}"
				                        ng-model="x.departmentId"
				                        text-Value="x.departmentName" /></td>
				                <td>
				                	<input type="text"
	                                	ng-model="x.tel" class="zs-input">
				                </td>
				                <td>
				                	<ag-Combotree class="zs-input" style="width:115px;height: 28px" 	
										para="{ uDictionary:true,
												dictionary:'p_register_service',
												pidField:'pid',
												multiple:true,
	                    						leafField:'leaf'}"
										ng-model="x.registerService"
										text-Value="x.registerServiceName"/></td>
				                <td>
				                	<ag-Combotree class="zs-input" style="width:115px;height: 28px" 	
										para="{ uDictionary:true,
												dictionary:'p_apply_type',
												pidField:'pid',
	                    						leafField:'leaf'}"
										ng-model="x.applyType"
										text-Value="x.applyTypeName"
										alias="修改类型" name="formApplyType" required/></td>
				        	</tr>
				        </tbody>
					</table>
				    <div>
	                    <input type="button" name="ok" value="保存" class="zs-btn c-red" style="margin-left: 362px;"
	                    	ng-click="formValidate(form) && save('useredit', useredit.editRow, saveCloseWindow)"/>
	                    <input type="button" name="ok" value="提交" class="zs-btn c-red"
	                    	ng-click="formValidate(form) && subSave('useredit', useredit.editRow, saveCloseWindow)"/>
	                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
	                    	ng-click="closeWindow('edit')" />      
				    </div>
				</form>
			</div>
	    </div> 
    </div>
</div>